package com.demo.hibernate.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

//TABLE,SEQUENCE,IDENTITY,AUTO.
//TABLE：使用一个特定的数据库表格来保存主键。
//SEQUENCE：根据底层数据库的序列来生成主键，条件是数据库支持序列。
//IDENTITY：主键由数据库自动生成（主要是自动增长型）
//AUTO：主键由程序控制。

@Entity
@Table(name = "HUserInformation")
public class HUserInformation {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	private String userCode;
	private String userPassword;

	public Long getId() {
		return id;
	}

	public String getUserCode() {
		return userCode;
	}

	public String getUserPassword() {
		return userPassword;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	@Override
	public String toString() {
		return "UserInformation [id=" + id + ", userCode=" + userCode + ", userPassword=" + userPassword + "]";
	}
}
